<div class="box-right">
    <div class="title-box">Các vấn đề tiêu biểu</div>
    <div class="ct-box border-B-G">
        <div class="row-qa overH border-B-G PdTB10">
            <div class="ct-qa">
                <div>
                    <span class="font11 color55 FL MgT7">Chọn danh mục:</span>
                    <div class="drop-list-menu FL" style="width:192px; margin-left:10px">
                        <?= Form::Select('hot_category_id',array('0'=>'Chọn danh mục') + $data['categories'], $data['category_id'], array('id' => 'hot_category', 'class' => ' ft-list-mn FL fa fa-caret-down form-control'))
                        ?>
                    </div>
                </div>
            </div>
        </div>

        <div class=" addd-host-question article-cmts">
            <ul style="line-height:21px">
                @foreach($data['hot_question'] as $hot_question)
                <li>
                    
                    <a href="{{route('chi-tiet-hoi-dap',array('id'=>$hot_question->id,'name'=>Str::slug($hot_question->title)))}}">{{$hot_question->title}}?
                    </a>
                </li>
                @endforeach
            </ul>
        </div>
    </div>
</div>

<div class="box-btn-right">
    <?php
    $paginator = $data['hot_question'];
    Paginator::setPageName('click_next_preview_question');
    $presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
    if ($paginator->getCurrentPage() > 1) {
        echo getPrevious($paginator->getCurrentPage(), $paginator->getUrl($paginator->getCurrentPage() - 1));
    } else {
        echo getPrevious($paginator->getCurrentPage(), $paginator->getUrl($paginator->getCurrentPage()));
    }
    if ($paginator->getCurrentPage() != $paginator->getLastPage()) {
        echo getNext($paginator->getCurrentPage(), $paginator->getLastPage(), $paginator->getUrl($paginator->getCurrentPage() + 1));
    } else {
        echo getNext($paginator->getCurrentPage(), $paginator->getLastPage(), $paginator->getUrl($paginator->getCurrentPage()));
    }
    ?>

    <?php

    function getPrevious($currentPage, $url) {
        return '<a href="' . $url . '" class="pre-view-click pre-view">&nbsp;</a>';
    }

    function getNext($currentPage, $lastPage, $url) {
        return '<a href="' . $url . '" class="next-view-click next-view">&nbsp;</a>';
    }
    ?>

</div>